*Does a competent leader make a good friend? - Laustsen & Petersen: Study 1

*---------------------------------------------------RECODING OF VARIABLES-------------------------------------------------------*

*Creates variable for choice of captain.
recode kaptajn (0 = 0) (1 = 1) (-99 = .), generate(captain)
label define captainLB 0 "Non-Dominant"  1 "Dominant"
label values captain  captainLB


*Creates variable for choice of cabin mate.
recode kahyt (0 = 0) (1 = 1) (-99 = .), generate(cabin)
label define cabinLB 0 "Non-Dominant"  1 "Dominant"
label values cabin cabinLB


*Creates context variable.
recode version (1 2 5 6 = 0) (3 4 7 8 = 1) (-99 = . ), generate(context)
label define contextLB 0 "Storm" 1 "Pirate"
label values context contextLB


*Creates variable for ideology based on subjects' party choice.
*Coding of original party choice variable:
*1 = Socialdemokraterne; 2 = Radikale Venstre; 3 = Konservative; 4 = Socialistisk Folkeparti; 5 = Liberal Alliance; 6 = Dansk Folkeparti; 7 = Venstre; 8 = Enhedslisten
*Creates dichotomy for leftwing (coded 0) and rightwing parties (coded 1):
recode parti (1 2 4 8 = 0) (3 5 6 7 = 1), generate(rightwing)


*Creates variable for subject sex
recode gender (0=0 "female") (1=1 "male") (-99=.), generate(sex) 


*-----------------------------------------------------------ANALYSES-----------------------------------------------------------*
*Contextual and ideological effects on choice of captain and cabin mate (Table 1)
logit captain context rightwing, or
logit cabin context rightwing, or


*----------------ROBUSTNESS ANALYSES AND EXTRA ANALYSES REPORTED IN ONLINE SUPPLEMENTARY MATERIAL-----------------------------*
*Possible interaction between context and ideology (Table B.1)
logit captain i.context##i.rightwing, or
logit cabin i.context##i.rightwing, or

*Possible interaction between context and subject sex (Table C.1)
logit captain i.context##i.sex rightwing, or
logit cabin i.context##i.sex rightwing, or

*Possible main effect of subject sex (Table C.2).
logit captain context rightwing sex, or
logit cabin context rightwing sex, or
